package com.hxzy.exception;

import com.hxzy.common.enums.AckCode;

/**
 * 自定义异常基类
 */
public class ServiceException extends RuntimeException{

    private AckCode ackCode;

    public AckCode getAckCode() {
        return ackCode;
    }

    public ServiceException(AckCode ackCode){
        super(ackCode.getMsg());
        this.ackCode=ackCode;
    }

    public ServiceException() {
    }

    public ServiceException(String message) {
        super(message);
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    public ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
